package cn.tedu.spring.life;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringRunner {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        TestService bean = context.getBean(TestService.class);
        Person person = context.getBean(Person.class);
        System.out.println("person = " + person);
        context.close();

    }
}
